import { ILoading, ILoadingDep } from "./ILoading";


export class LoadingOne implements ILoading {

    next: ILoading[] = [];

    constructor(
        public dep: ILoadingDep,
    ) {

    }

    getProgress(): number {
        return this.dep.loadedProgress / this.dep.totalProgress;
    }

    getProgressDesc(): string {
        return "正在加载bundle" + this.getProgress();
    }

    addNext(loading: ILoading): void {
        if(!loading){
            return;
        }
        this.next.push(loading);
    }



}